import Button from "./Button";

const Header = (props) => {
  const onClick = () => {
    console.log("click");
  };

  return (
    <header className="header">
      <h3>{props.text}</h3>
      <Button
        color={props.showAdd ? "red" : "green"}
        text={props.showAdd ? "取消" : "新建"}
        onClick={props.onClick}
      />
    </header>
  );
};

// const headerstyle = {
//   color: "red",
//   backgroundColor: "blacl=k",
// };

export default Header;
